package com.firetornado.android.gowallajava;

import com.firetornado.android.gowallajava.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

/**
 * Main screen for demo Android App showcasing spot call, user call, item call, and trip call. This screen contains the 
 * buttons that launch the activities.
 * 
 * @author Ryan Crutchfield - rc6750@gmail.com
 * http://gowalla.com/users/rc6750
 *
 */

public class GowallaJavaAndroid extends Activity {
	
	private Button spots_button;
	private Button users_button;
	private Button items_button;
	private Button trips_button;
		
	@Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        setContentView(R.layout.main);
       //Spot Details button
        this.spots_button = (Button)this.findViewById(R.id.spots);
        this.spots_button.setOnClickListener(new OnClickListener() {
          public void onClick(View arg0) {
			Intent i = new Intent(GowallaJavaAndroid.this, SpotsMain.class);
      		startActivity(i);
          }
        });
        //User Details button
        this.users_button = (Button)this.findViewById(R.id.users);
        this.users_button.setOnClickListener(new OnClickListener() {
          public void onClick(View arg0) {
			Intent i = new Intent(GowallaJavaAndroid.this, UsersMain.class);
      		startActivity(i);
          }
        }); 
        //Item Details button
        this.items_button = (Button)this.findViewById(R.id.items  );
        this.items_button.setOnClickListener(new OnClickListener() {
          public void onClick(View arg0) {
			Intent i = new Intent(GowallaJavaAndroid.this, ItemsMain.class);
      		startActivity(i);
          }
        });
        //Trip Details button
        this.trips_button = (Button)this.findViewById(R.id.trips);
        this.trips_button.setOnClickListener(new OnClickListener() {
          public void onClick(View arg0) {
			Intent i = new Intent(GowallaJavaAndroid.this, TripsMain.class);
      		startActivity(i);
          }
        });
    }
    
}